package com.lgc.javathread.threadPoolTest;

import com.lgc.javathread.threadPoolTest.threadproject.MyThread;

/**
 * Created by Administrator on 2018/3/24.
 */
public class Program {
    public static void main(String[] args) {
        MyThread mt = new MyThread();       //4,创建Thread类的子类对象
        //mt.run();//先执行run方法并没有开启线程,他就是一个普通方法,先输出a后输出b.
        mt.start();             //5开启线程,先b后a交替出现,开启线程也需要时间



        for(int i = 0; i < 100; i++) {
            System.out.println("bbbbbbbbbbb");
        }

        //lambda
        new Thread(()->{
            for(int i = 0; i < 100; i++) {
                System.out.println("lambda thread");
            }
        }).start();
    }
}
